//
//  SearchResultView.h
//  MyProject
//
//  Created by 石小强 on 2018/4/18.
//  Copyright © 2018年 yanjiaming. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UITableView+Empty.h"
#import "CompanyModel.h"
#import "PositionModel.h"
#import "WorkmateModel.h"
#import "QuestionModel.h"
#import "DecryptModel.h"

typedef void(^CompanyBlock) (CompanyModel *company);
typedef void(^PositionBlock) (PositionModel *position);
typedef void(^WorkmateBlock) (WorkmateModel *workmate);
typedef void(^QuestionBlock) (QuestionModel *question);
typedef void(^DecryptBlock) (DecryptModel *decrypt);

@interface SearchResultView : UIView

@property (nonatomic, strong) UIView *topView;
@property (nonatomic, strong) UIView *topIndicatorView;
@property (nonatomic, strong) UIScrollView *bottomScrollView;

- (void)setupTopViewTitles:(NSArray *)titles;

- (void)setSelectIndex:(NSInteger)index;

@property (nonatomic, copy) NSString *key;

@property (nonatomic, copy) CompanyBlock companyBlock;
@property (nonatomic, copy) PositionBlock positionBlock;
@property (nonatomic, copy) WorkmateBlock workmateBlock;
@property (nonatomic, copy) QuestionBlock questionBlock;
@property (nonatomic, copy) DecryptBlock decryptBlock;

/** 加载综合数据 */
- (void)loadComprehensiveData;

/** 加载企业数据 */
- (void)loadCompanyData;

/** 加载职位数据 */
- (void)loadPositionData;

/** 加载同事数据 */
- (void)loadWorkmateData;

/** 加载问题数据 */
- (void)loadQuestionData;

/** 加载解密数据 */
- (void)loadDecryptData;

- (void)clearData;

@end
